let page = 0
async function renderPage() {
    page++
    let str = ''
    let params = {
        page
    }
    let data = await getData('v1/search/video_list', params, 'UqyWVzmhdo/i3S2SwRG0T7eq8J8FoTBSykojSK3YCxrLm6+uXu3UoozBKUrvp6ycGI4ZgnwtV+7Bb1gMa7REkQ==')
    data.data.forEach((ele) => {
        str +=
            `
            <div class="video-item">
            <div class="video-item-cover"
                style="background-image: url(${ele.smallImages[0]}">
                <div class="play-icon">
                    <img src="https://m.feng.com/assets/play.48bf88f4.svg" alt="">
                </div>
                <div class="video-item-author">
                    <div class="author-photo">
                        <img src="${ele.userBaseInfo.userAvatar}"
                            alt="">
                    </div>
                    <div class="author-name">${ele.userBaseInfo.userName}</div>
                </div>
            </div>
            <div class="video-item-bottom">
                <div class="item-spreadhead">${ele.title}</div>
                <div class="item-subtitle">
                ${ele.content}
                </div>
            </div>
        </div>
             `
    })
    $('.van-list').append(str)
}
renderPage()
let _load = true
window.addEventListener('scroll', function () {
    // 检查是否滚动到页面底部
    if (document.documentElement.scrollTop + window.innerHeight >= document.documentElement.scrollHeight - 100 && _load) {
        // 在此处加载更多内容
        renderPage()
        setTimeout(() => {
            _load = true;
        }, 2500);
        _load = false;
    }
});